<ui:fragment xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">
    <h:form>
        <ul class="nav">
            <li>
                <h:commandLink value="Accueil" action="#{searchManagedBean.getAllBooks}"/>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Livres <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <ui:repeat var="c" value="#{myCategoryController.categories}">
                        <li>
                            <h:commandLink value="#{c.label}" action="#{searchManagedBean.findBooksFromCategory}">
                                <f:param name="catID" value="#{c.id}"/>
                            </h:commandLink>
                        </li>
                    </ui:repeat>
                </ul>
            </li>
            <li>
                <h:commandLink value="A propos" action="toAbout" />
            </li>
            <li>
                <h:commandLink value="Contact" action="toContact" />
            </li>
            <li><a href="admin/admin.xhtml" style="visibility: #{customerManagedBean.securityManagedBean.admin ? 'visible' : 'hidden'}">Admin</a></li>
        </ul>
    </h:form>
</ui:fragment>